package gmmxEditor.GUI;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JButton;

public class CButton extends JButton {

	private static final long	serialVersionUID	= -1284086749795509038L;
	private Color				background			= null;

	public CButton(String text) {
		super(text);
	}

	public CButton() {
		super();
	}

	@Override
	public void setBackground(Color bg) {
		this.background = bg;
	}

	@Override
	public void paintComponent(Graphics g) {
		if (this.background != null) {
			g.setColor(this.background);
		}

		g.fillRect(0, 0, this.getWidth(), this.getHeight());

		g.setColor(Color.BLACK);

		g.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1);

		//super.paintComponent(g);
	}

}
